package com.zx.mes.hyl.feign;

import com.zx.mes.hyl.entity.Store;
import com.zx.mes.hyl.response.ObjectRestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * order service provider
 *
 * @author 华云龙
 * @date 2018-12-10
 */
@FeignClient("long-store")
public interface StoreServiceProvider {

    /**
     * 路径传参
     *
     * @param id store id
     * @return ObjectRestResponse
     */
    @RequestMapping(value = {"/store/getOne/{id}"}, method = RequestMethod.GET)
    ObjectRestResponse get(@PathVariable("id") String id);

    /**
     * 根据store 贷物的id与提供商的id,来获取唯一的一笔数据
     *
     * @param goodId 货物id
     * @param supplierId 提供商id
     * @return store 详细数据
     */
    @GetMapping("/store/getByGoodIdAndSupplierId")
    ObjectRestResponse<Store> getByGoodIdAndSupplierId(@RequestParam("goodId") String goodId,@RequestParam("supplierId") String supplierId);
}
